/* management.css - 宠物管理系统页面样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: url('../imgs/2.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.page-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.main-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
    min-height: 600px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, #FFE4E1 0%, #FFF8DC 100%);
    padding: 40px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 182, 193, 0.3) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.header-content {
    position: relative;
    z-index: 2;
}

.header-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.page-title {
    font-size: 2.5rem;
    color: #FF6B6B;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.page-subtitle {
    font-size: 1.1rem;
    color: #8B4513;
}

/* 内容包装器 */
.content-wrapper {
    padding: 40px 50px;
}

/* 章节样式 */
.form-section, .table-section {
    margin-bottom: 40px;
    background: #FAFAFA;
    border-radius: 15px;
    border: 2px solid #F0F0F0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.form-section:hover, .table-section:hover {
    border-color: #FFE4E1;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.1);
}

.section-header {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE4E1 100%);
    padding: 20px 30px;
    border-bottom: 2px solid #F0F0F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    font-size: 1.2rem;
    color: #FF6B6B;
}

.table-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.record-count {
    background: #FF6B6B;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 表单样式 */
.add-form {
    padding: 30px;
}

/* 下拉选择框样式 */
.select-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

.select-input:focus {
    outline: none;
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group label i {
    color: #FF6B6B;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #999;
}

.form-actions {
    text-align: center;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #FF5252 0%, #FF7575 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1rem;
}

/* 表格样式 */
.table-container {
    position: relative;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
}

.data-table th {
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #DEE2E6;
    position: relative;
}

.th-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.th-content i {
    color: #FF6B6B;
    font-size: 0.9rem;
}

.data-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #F0F0F0;
}

.data-table tbody tr:hover {
    background: linear-gradient(135deg, #FFF8F8 0%, #FFF5F5 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.1);
}

.data-table td {
    padding: 20px 15px;
    vertical-align: middle;
    color: #333;
}

.id-cell {
    font-weight: 600;
    color: #FF6B6B;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
}

/* 宠物头像样式 */
.pet-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pet-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE4E1 0%, #FFF8DC 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid #FF6B6B;
}

.pet-name {
    font-weight: 500;
    color: #333;
}

/* 种类标签 */
.species-tag {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: #1976D2;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #BBDEFB;
}

.breed-text {
    color: #666;
    font-style: italic;
}

/* 性别徽章 */
.gender-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gender-badge.male {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: #1976D2;
    border: 1px solid #BBDEFB;
}

.gender-badge.female {
    background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD9 100%);
    color: #C2185B;
    border: 1px solid #F8BBD9;
}

.birth-date {
    color: #666;
    font-family: 'Courier New', monospace;
}

.owner-id {
    background: #F8F9FA;
    color: #FF6B6B;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    border: 1px solid #FF6B6B;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.phone-link {
    color: #FF6B6B;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 20px;
    background: #FFF8F8;
    transition: all 0.3s ease;
    display: inline-block;
}

.phone-link:hover {
    background: #FF6B6B;
    color: white;
    transform: scale(1.05);
}

.address-text {
    color: #666;
    line-height: 1.4;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    font-size: 1rem;
    opacity: 0.8;
}

/* 返回按钮 */
.back-section {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #F0F0F0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #6C757D 0%, #868E96 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.back-btn:hover {
    background: linear-gradient(135deg, #5A6268 0%, #6C757D 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* 装饰性爪印 */
.decorative-paws {
    position: fixed;
    font-size: 1.5rem;
    color: rgba(255, 107, 107, 0.2);
    animation: rotate 8s linear infinite;
    z-index: 1;
}

.paw-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.paw-2 {
    bottom: 20%;
    right: 5%;
    animation-delay: 2s;
}

.paw-3 {
    top: 60%;
    left: 5%;
    animation-delay: 4s;
}

.paw-4 {
    top: 20%;
    left: 10%;
    animation-delay: 6s;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .content-wrapper {
        padding: 30px 40px;
    }

    .form-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-container {
        border-radius: 15px;
    }

    .page-header {
        padding: 30px 20px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .content-wrapper {
        padding: 20px;
    }

    .section-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .add-form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }

    .user-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .submit-btn,
    .back-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .data-table thead,
    .data-table tbody,
    .data-table th,
    .data-table td,
    .data-table tr {
        display: block;
    }

    .data-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .data-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 15px;
        border-radius: 10px;
        background: white;
    }

    .data-table td {
        border: none;
        position: relative;
        padding: 8px 0;
        padding-left: 50%;
        white-space: normal;
    }

    .data-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #FF6B6B;
    }

    .pet-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .pet-avatar {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.edit-btn, .delete-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #388E3C 0%, #4CAF50 100%);
    transform: translateY(-2px);
}

.delete-btn {
    background: linear-gradient(135deg, #F44336 0%, #EF5350 100%);
    color: white;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #D32F2F 0%, #F44336 100%);
    transform: translateY(-2px);
}